package top.shen33.yang;

import cn.licoy.encryptbody.annotation.EnableEncryptBody;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.context.WebApplicationContext;


//@ImportResource("classpath:transaction.xml")
@SpringBootApplication
@EnableTransactionManagement
//@EnableCaching
//@MapperScan("top.shen33.yang.xml*")
@EnableScheduling
//@EnableEncryptBody
public class YangApplication extends SpringBootServletInitializer{

    public static void main(String[] args) {

//        SpringApplication.run(YangApplication.class, args);

        SpringApplication app = new SpringApplication(YangApplication.class);
        app.setBannerMode(Banner.Mode.OFF);
        app.run(args);
        System.out.println("http://localhost:9000/");
    }


    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(YangApplication.class);
    }

    @Override
    protected WebApplicationContext run(SpringApplication application) {
        return super.run(application);
    }
}
